'''
将xlsx文件中的市保存到txt文档中
'''
import openpyxl

wb = openpyxl.load_workbook(r'C:\Users\ZFH\Desktop\1.xlsx')
f = open(r'C:\Users\ZFH\Desktop\1.txt', 'w')
sh = wb.get_sheet_by_name('测试')
t = 1
for i in sh.rows:
    try:
        if t > 2:
            f.write(sh.cell(row=t, column=3).value)
    except:
        pass
    t += 1
f.close()
